feat: terminateVisibilityTimeout = number to customise the timeout #520
+39
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #523
Description:
This allows users to introduce a delay before the message can be received again. In some cases this can improve the overall success rate.
Type of change:
Why is this change required?:
When tasks are not time critical, a small delay can mitigate some intermittent errors, or give supervisors like K8s a little time to kill broken consumers.
Code changes:
terminateVisibilityTimeout
option has been updated to accept custom visibility timeouts.I reused the option as I thought it was the most non-intrusive way to introduce this feature. If it appears to be confusing, I can also add a new option. But since the underlying SQS command is the same, I think it's ok.
Checklist: